{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="tabs clearfix">
    <a href="javascript:;" class="active tabs_a fl" data-origin="addserviceproviders" data-index="1">基本信息</a>
    <a href="javascript:;" class="tabs_a fl" data-origin="addserviceproviders" data-index="2">服务及服务商简介</a>
    <a href="javascript:;" class="tabs_a fl" data-origin="addserviceproviders" data-index="3">服务内容及收费说明</a>
</div>
<!-- end tabs -->
<div class="tabs-content" data-origin="addserviceproviders">
    <form method="post" id="form_addServiceProviders" enctype="multipart/form-data">
        <div class="tc hide" data-index="3">
            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>服务内容：</label>
                <div class="form-controls">
                    <script id="service_content" name="service_content" type="text/plain"></script>
                    <span class="fi-help-text error"></span>
                </div>
            </div>
            <div class="formitems inline">
                <label class="fi-name"><!-- <span class="colorRed">*</span> -->收费说明：</label>
                <div class="form-controls">
                    <script id="charge" name="charge" type="text/plain" ></script>
                    <span class="fi-help-text error"></span>
                </div>
            </div>
            <div class="formactions mgl180">
                <button class="btn btn-blue"><i class="gicon-ok white"></i>提交</button>
            </div>
        </div>
        <!-- end 详细描述 -->
        <div class="tc hide" data-index="2">
            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>服务简介：</label>
                <div class="form-controls">
                    <textarea name="service_describe" id="service_describe">{$item.item_desc}</textarea>
                    <span class="fi-help-text"></span>
                </div>
            </div>


            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>服务商简介：</label>
                <div class="form-controls">
                    <script id="service_providers_describe" name="service_providers_describe" type="text/plain"></script>
                    <span class="fi-help-text error"></span>
                </div>
            </div>
            <div class="formactions mgl180">
                <span class="btn btn-blue jump" data-value='3'>下一步</span>
            </div>
        </div>

        <!-- end 规格属性 -->
        <div class="tc" data-index="1">

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>用户帐号：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入用户帐号" class="xlarge" name="username">
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>密码：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入用户密码" class="xlarge" name="password">
                    <span class="fi-help-text error">新帐号必填,已有帐号则不填．</span>
                </div>
            </div>


            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>服务商状态：</label>
                <div class="form-controls">
                    <select name="service_providers_status">
                        <option value="">--请选择--</option>
                        {foreach from=$providers_status item=status key=key}
                        <option value="{$key}">{$status}</option>
                        {/foreach}
                    </select>
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>服务类型：</label>
                <div class="form-controls">
                    <select name="service_type_id">
                        <option value="">--请选择--</option>
                        {foreach from=$service_type_list item=type}
                        <option value="{$type.service_type_id}">{$type.service_type_name}</option>
                        {/foreach}
                    </select>
                    <span class="fi-help-text error"></span>
                </div>
            </div>
            <!-- 服务商LOGO -->
            {upload_image_widget($logo_pic)}

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>服务商名称：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入服务商名称" class="xxlarge" name="service_providers_name">
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>地区选择：</label>
                <div class="form-controls">
                    <select name="province_id" id="province_id">
                        <option value="">--选择省份--</option>
                        {foreach from=$province_list item=item}
                        <option value="{$item.province_id}">{$item.province_name}</option>
                        {/foreach}
                    </select>
                    <select name="city_id" id="city_id">
                        <option value="">--选择城市--</option>
                        {foreach from=$city_list item=item}
                        <option value="{$item.city_id}">{$item.city_name}</option>
                        {/foreach}
                    </select>
                    <select name="area_id" id="area_id">
                        <option value="">--选择地区--</option>
                        {foreach from=$area_list item=item}
                        <option value="{$item.area_id}" >{$item.area_name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>地址：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入地址" class="xxlarge" name="address">
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>联系人：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入联系人" class="xxlarge" name="user_name" id="user_name">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>联系人电话：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入联系人电话" class="xxlarge" name="mobile">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>网址：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入联系人电话" class="xxlarge" name="url">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>


            <div class="formitems inline">
                <label class="fi-name">评分：</label>
                <div class="form-controls">
                    <input type="text" placeholder="0" class="small" name="score">
                    <span class="fi-text">分</span>
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">
                    <span class="colorRed">*</span>企业名称：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入企业简称" class="xxlarge" name="enterprise_name">
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <!-- 营业执照 -->
            {upload_image_widget($charter_pic)}

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>企业负责人：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入企业负责人" class="xxlarge" name="enterprise_user_name">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>企业负责人电话：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入企业负责人电话" class="xxlarge" name="enterprise_user_mobile">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>企业邮箱：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入企业邮箱" class="xxlarge" name="email">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>


            <div class="formitems inline">
                <label class="fi-name"><span class="colorRed">*</span>公众号：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入公众号" class="xxlarge" name="accounts">
                    <span class="fi-help-text hide"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">推荐：</label>
                <div class="form-controls">
                    <div class="radio-group">
                        <label><input type="radio" name="is_recommend" value="0" >否</label>
                        <label><input type="radio" name="is_recommend" value="1" checked>是</label>
                    </div>
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <div class="formitems inline">
                <label class="fi-name">排序号：</label>
                <div class="form-controls">
                    <input type="text" placeholder="请输入排序号" class="small" name="serial">
                    <span class="fi-help-text error"></span>
                </div>
            </div>

            <!-- accounts_code公众号二维码 -->
            {upload_image_widget($accounts_code_pic)}

            <!-- 海报 -->
            {upload_image_widget($poster_pic)}

                <div class="formitems inline">
                    <label class="fi-name"><span class="colorRed">*</span>主营业务：</label>
                    <div class="form-controls">
                        <textarea name="business" id="business">{$item.item_desc}</textarea>
                        <span class="fi-help-text"></span>
                    </div>
                </div>
            <!--{upload_image_widget($pic_data)}-->

            <div class="formactions mgl180">
                <input type="hidden" name="action" value="add">
                <span class="btn btn-blue jump" data-value='2'>下一步</span>
            </div>
        </div>

        <!-- end 基本信息 -->
    </form>
</div>
{/block}
{block name="css"}
{literal}
<style>
    #jpops .fi-name {
        width: 65px;
    }

    #jpops .form-controls {
        margin-left: 75px;
    }

    #j-item-extend li {
        margin-bottom: 10px;
    }

    .edit_item_tip {
        font-size: 18px;
        color: #a0a0a0;
        background-color: inherit;
        text-decoration: none;
        margin: 20px 180px;
    }
</style>
{/literal}
{/block}
{block name="js"}
<script type="text/javascript" charset="utf-8" src="__UE__/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__UE__/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__UE__/lang/zh-cn/zh-cn.js"></script>
<script src="__ACPJS__/AcpServiceProviders/linkage.js?version={$version}"></script>
<script src="__ACPJS__/AcpServiceProviders/service_validate.js?version={$version}"></script>
<script src='/Public/Js/common/upload_image.js?version={$version}'></script>
<script>
    UE.getEditor('service_content',{
        initialFrameWidth : 600,
        initialFrameHeight: 400,
        autoHeightEnabled: false,
        autoFloatEnabled:false
    });
    UE.getEditor('service_providers_describe',{
        initialFrameWidth : 600,
        initialFrameHeight: 400,
        autoHeightEnabled: false,
        autoFloatEnabled:false
    });
    UE.getEditor('charge',{
        initialFrameWidth : 600,
        initialFrameHeight: 400,
        autoHeightEnabled: false,
        autoFloatEnabled:false
    });

//    var flag = 1;
//    upload_batch_image('pic');

    $(function(){
        // 根据商品类型获取商品属性
        $('.jump').click(function(){
            var index = $(this).data('value');
            acp.switchTabByDataIndex(index,"addserviceproviders");
        })
    });
</script>
{/block}
